home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume2 / aplictns / matlab / help.1 < prev    next >
Internet Message Format  |  1988-11-03  |  35KB

  1. Path: xanth!nic.MR.NET!hal!cwjcc!mailrus!bbn!ulowell!page
  2. From: page@swan.ulowell.edu (Bob Page)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v02i048:  matlab - matrix laboratory, Part08/11 (help01/02)
  5. Message-ID: <10023@swan.ulowell.edu>
  6. Date: 2 Nov 88 21:51:22 GMT
  7. Organization: University of Lowell, Computer Science Dept.
  8. Lines: 498
  9. Approved: page@swan.ulowell.edu
  10.  
  11. Submitted-by: strovink%galaxy-43@afit-ab.arpa (Mark A. Strovink)
  12. Posting-number: Volume 2, Issue 48
  13. Archive-name: applications/matlab/help.1
  14.  
  15. #    This is a shell archive.
  16. #    Remove everything above and including the cut line.
  17. #    Then run the rest of the file through sh.
  18. #----cut here-----cut here-----cut here-----cut here----#
  19. #!/bin/sh
  20. # shar:    Shell Archiver
  21. #    Run the following text with /bin/sh to create:
  22. #    readme
  23. #    help-1
  24. # This archive created: Wed Nov  2 16:23:14 1988
  25. cat << \SHAR_EOF > readme
  26. MATLAB stands for MATrix LABoratory.  It is a FORTRAN package developed by 
  27. Argonne National Laboratories for in-house use.  It provides comprehensive
  28. vector and tensor operations in a package which may be programmed, either
  29. through a macro language or through execution of script files.
  30.  
  31. Matlab is reentrant and recursive.  Functions supported include (but not 
  32. by any means limited to) sin, cos, tan, arcfunctions, upper triangular,
  33. lower triangular, determinants, matrix multiplication, identity, hilbert 
  34. matrices, eigenvalues and eigenvectors, matrix roots and products, inversion
  35. and so on and so forth.
  36.  
  37. The file available on the bulletin board as Matlab.arc contains an Amiga-ized
  38. executable copy of MATLAB and the online help file, as well as this intro.
  39.  
  40. If you want the source code (over 300K) and a manual, or if your bulletin 
  41. board only has this message and not the package, send $5.00 and a 3.5" 
  42. disk to:
  43.  
  44.                            Jim Locker
  45.                            4443 N. Hyland Ave.
  46.                            Dayton, Oh 45424
  47.  
  48. The package is public domain, but of course postage and reproduction cost
  49. money.  Believe me, this package is a bargain at the price.  Please feel free
  50. to distribute the package.
  51.  
  52. The source was taken off a VAX 11/780.  It ran without modification (except the
  53. file handler and some minor error handling) on an Amiga 1000 using ABSoft 
  54. Fortran v2.2.  It will run in 512K environment.  I have seen it on IBM 
  55. mainframes and IBM PCs.  
  56.  
  57. ********************** A Sample Session ***********************************
  58.  
  59. For this session the <> character is the MATLAB prompt.
  60.  
  61.  <> a=<1 2 3;5 4 6;7 8 9>            <---  you enter this
  62.  
  63.  A     =                             <---  MATLAB response
  64.  
  65.      1.    2.    3.
  66.      5.    4.    6.
  67.      7.    8.    9.
  68.  
  69.  <> b=<5;6;7>                        <--- you enter this
  70.  
  71.  B     =                             <--- MATLAB response
  72.  
  73.      5.
  74.      6.
  75.      7.
  76.  
  77.  <> a*b             <--- you enter "multiply a and b"
  78.  
  79.  ANS   =            <--- MATLAB response
  80.  
  81.     38.
  82.     91.
  83.    146.
  84.  
  85.  <> b*a             <---you enter "multiply b and a"
  86.     /--ERROR                         <--- MATLAB response
  87.  INCOMPATIBLE FOR MULTIPLICATION
  88.  
  89.  <> det(a)         <--- Take the determinant of a
  90.  
  91.  ANS   =           <---MATLAB response
  92.  
  93.     18.
  94.  
  95.  <> exit           <--- you quit MATLAB
  96.  
  97.  total flops        34
  98.  
  99.  ADIOS
  100.  
  101. SHAR_EOF
  102. cat << \SHAR_EOF > help-1
  103. Appendix.  The HELP document                                                    
  104.                                                                                 
  105. NEWS  MATLAB NEWS dated 8/5/88 .                                               
  106.       MATLAB has been ported to the Amiga in August 1988.  This is a 
  107.       straight port of VAX FORTRAN source with no enhancements.  Possible 
  108.       Amiga enhancements (depending upon how many folks are interested)
  109.       include Workbench startup and a greatly enhanced PLOT function.
  110.       I dunno...maybe.
  111.       
  112.       If you would like a copy of MATLAB source and the users guide,
  113.       send a 3.5 disk and $5.00 american to:
  114.  
  115.                   Jim Locker
  116.                   4443 N. Hyland Ave.
  117.                   Dayton Oh 45424
  118.  
  119.       You aren't paying me for developing the stuff (I didn't...Argonne
  120.       National Labs did. I just ported it), you are paying for postage
  121.       and the cost of copying the manual.
  122.                                                                           
  123. INTRO Welcome to MATLAB.                                                        
  124.                                                                                 
  125.       Here are a few sample statements:                                         
  126.                                                                                 
  127.       A = <1 2; 3 4>                                                            
  128.       b = <5 6>'                                                                
  129.       x = A\b                                                                   
  130.       <V,D> = eig(A),  norm(A-V*D/V)                                            
  131.       help \ , help eig                                                         
  132.       exec('demo',7)                                                            
  133.                                                                                 
  134.       For more information, see the MATLAB Users' Guide which  is               
  135.       contained in file ...  or may be obtained from Jim Locker.
  136.       See the HELP NEWS section.                      
  137.                                                                                 
  138. HELP  HELP gives assistance.                                                    
  139.       HELP HELP obviously prints this message.                                  
  140.       To see all the HELP messages, list the file ... .                         
  141.                                                                                 
  142. <     < > Brackets used in forming vectors and matrices.                        
  143.       <6.9  9.64  SQRT(-1)>  is  a  vector  with  three  elements               
  144.       separated  by  blanks.   <6.9,  9.64, sqrt(-1)> is the same               
  145.       thing.  <1+I 2-I 3>  and  <1 +I 2 -I 3>  are not the  same.               
  146.       The first has three elements, the second has five.                        
  147.       <11 12 13; 21 22 23>  is a 2 by 3 matrix .   The  semicolon               
  148.       ends the first row.                                                       
  149.                                                                                 
  150.       Vectors and matrices can be used inside < > brackets.                     
  151.       <A B; C>  is allowed if the number of rows  of   A   equals               
  152.       the  number  of rows of  B  and the number of columns of  A               
  153.       plus the number of columns of   B   equals  the  number  of               
  154.       columns  of   C  .   This  rule  generalizes in a hopefully               
  155.       obvious way to allow fairly complicated constructions.                    
  156.                                                                                 
  157.       A = < >  stores an empty matrix in  A , thereby removing it               
  158.       from the list of current variables.                                       
  159.                                                                                 
  160.       For the use of < and > on the left of  the  =  in  multiple               
  161.       assignment statements, see LU, EIG, SVD and so on.                        
  162.                                                                                 
  163.       In WHILE and IF clauses, <>  means  less  than  or  greater               
  164.       than,  i.e.  not  equal, < means less than, > means greater               
  165.       than, <= means less than or equal, >= means greater than or               
  166.       equal.                                                                    
  167.                                                                                 
  168.       For the use of > and < to delineate macros, see MACRO.                    
  169.                                                                                 
  170. >     See < .  Also see MACRO.                                                  
  171.                                                                                 
  172. (     ( ) Used to indicate precedence in  arithmetic  expressions               
  173.       in  the  usual way.  Used to enclose arguments of functions               
  174.       in the usual way.  Used to enclose  subscripts  of  vectors               
  175.       and  matrices  in  a  manner somewhat more general than the               
  176.       usual way.  If  X   and   V  are  vectors,  then   X(V)  is               
  177.       <X(V(1)),  X(V(2)),  ...,  X(V(N))> .  The components of  V               
  178.       are rounded to nearest integers and used as subscripts.  An               
  179.       error  occurs  if  any  such  subscript  is  less than 1 or               
  180.       greater than the dimension of  X .  Some examples:                        
  181.       X(3)  is the third element of  X .                                        
  182.       X(<1 2 3>)  is the first three elements of  X .  So is                    
  183.       X(<SQRT(2), SQRT(3), 4*ATAN(1)>)  .                                       
  184.       If  X  has  N  components,  X(N:-1:1) reverses them.                      
  185.       The same indirect subscripting is used in matrices.  If   V               
  186.       has   M  components and  W  has  N  components, then A(V,W)               
  187.       is the  M by N  matrix formed from the elements of A  whose               
  188.       subscripts are the elements of  V  and  W .  For example...               
  189.       A(<1,5>,:) = A(<5,1>,:)  interchanges rows 1 and 5 of  A .                
  190.                                                                                 
  191. )     See  ( .                                                                  
  192.                                                                                 
  193. =     Used in assignment statements and to mean equality in WHILE               
  194.       and IF clauses.                                                           
  195.                                                                                 
  196. .     Decimal point.  314/100, 3.14  and   .314E1   are  all  the               
  197.       same.                                                                     
  198.                                                                                 
  199.       Element-by-element multiplicative operations  are  obtained               
  200.       using  .*  ,  ./  , or .\ .  For example, C = A ./ B is the               
  201.       matrix with elements  c(i,j) = a(i,j)/b(i,j) .                            
  202.                                                                                 
  203.       Kronecker tensor products and quotients are  obtained  with               
  204.       .*. , ./.  and .\. .  See KRON.                                           
  205.                                                                                 
  206.       Two or  more  points  at  the  end  of  the  line  indicate               
  207.       continuation.    The   total  line  length  limit  is  1024               
  208.       characters.                                                               
  209.                                                                                 
  210. ,     Used to separate matrix subscripts and function  arguments.               
  211.       Used  at  the  end  of  FOR, WHILE and IF clauses.  Used to               
  212.       separate statements  in  multi-statement  lines.   In  this               
  213.       situation,  it  may  be  replaced  by semicolon to suppress               
  214.       printing.                                                                 
  215.                                                                                 
  216. ;     Used inside brackets to end rows.                                         
  217.       Used after an expression or statement to suppress printing.               
  218.       See SEMI.                                                                 
  219.                                                                                 
  220. \     Backslash or matrix left division.   A\B   is  roughly  the               
  221.       same  as   INV(A)*B  , except it is computed in a different               
  222.       way.  If  A  is an N by N matrix and  B  is a column vector               
  223.       with  N  components, or a matrix with several such columns,               
  224.       then X = A\B  is the solution to  the  equation   A*X  =  B               
  225.       computed  by  Gaussian  elimination.   A warning message is               
  226.       printed if  A is badly scaled or nearly singular.                         
  227.       A\EYE produces the inverse of  A .                                        
  228.                                                                                 
  229.       If  A  is an  M by N  matrix with  M < or > N  and  B  is a               
  230.       column vector with  M  components, or a matrix with several               
  231.       such columns, then  X = A\B  is the solution in  the  least               
  232.       squares  sense  to  the under- or overdetermined system  of               
  233.       equations A*X = B .  The  effective  rank,  K,  of   A   is               
  234.       determined  from  the  QR  decomposition  with pivoting.  A               
  235.       solution  X  is  computed  which  has  at  most  K  nonzero               
  236.       components  per column.  If  K < N this will usually not be               
  237.       the same solution as PINV(A)*B .                                          
  238.       A\EYE produces a generalized inverse of  A .                              
  239.                                                                                 
  240.       If A and B have the  same  dimensions,  then  A  .\  B  has               
  241.       elements a(i,j)\b(i,j) .                                                  
  242.                                                                                 
  243.       Also, see EDIT.                                                           
  244.                                                                                 
  245. /     Slash or matrix right division.  B/A  is roughly  the  same               
  246.       as  B*INV(A) .  More precisely,  B/A = (A'\B')' .  See \ .                
  247.                                                                                 
  248.       IF A and B have the  same  dimensions,  then  A  ./  B  has               
  249.       elements a(i,j)/b(i,j) .                                                  
  250.                                                                                 
  251.       Two or more slashes together on a line indicate  a  logical               
  252.       end of line.  Any following text is ignored.                              
  253.                                                                                 
  254. '     Transpose.  X'  is the complex conjugate transpose of  X  .               
  255.       Quote.   'ANY  TEXT'   is a vector whose components are the               
  256.       MATLAB internal codes for the characters.  A  quote  within               
  257.       the text is indicated by two quotes.  See DISP and FILE .                 
  258.                                                                                 
  259. +     Addition.  X + Y .  X and Y must have the same dimensions.                
  260.                                                                                 
  261. -     Subtraction.  X  -  Y  .   X  and  Y  must  have  the  same               
  262.       dimensions.                                                               
  263.                                                                                 
  264. *     Matrix multiplication, X*Y .  Any scalar (1  by  1  matrix)               
  265.       may multiply anything.  Otherwise, the number of columns of               
  266.       X must equal the number of rows of Y .                                    
  267.                                                                                 
  268.       Element-by-element multiplication is obtained with X .* Y .               
  269.                                                                                 
  270.       The Kronecker tensor product is denoted by X .*. Y .                      
  271.                                                                                 
  272.       Powers.  X**p  is  X  to the   p   power.   p   must  be  a               
  273.       scalar.  If  X  is a matrix, see  FUN .                                   
  274.                                                                                 
  275. :     Colon.  Used in subscripts,  FOR  iterations  and  possibly               
  276.       elsewhere.                                                                
  277.       J:K  is the same as  <J, J+1, ..., K>                                     
  278.       J:K  is empty if  J > K .                                                 
  279.       J:I:K  is the same as  <J, J+I, J+2I, ..., K>                             
  280.       J:I:K  is empty if  I > 0 and J > K or if I < 0 and J < K .               
  281.       The colon notation can be used to pick out  selected  rows,               
  282.       columns and elements of vectors and matrices.                             
  283.       A(:)  is all the  elements  of  A,  regarded  as  a  single               
  284.       column.                                                                   
  285.       A(:,J)  is the  J-th  column of A                                         
  286.       A(J:K)  is  A(J),A(J+1),...,A(K)                                          
  287.       A(:,J:K)  is  A(:,J),A(:,J+1),...,A(:,K) and so on.                       
  288.       For the use of the colon in the FOR statement, See FOR .                  
  289.                                                                                 
  290. ABS   ABS(X)  is the absolute value, or complex modulus,  of  the               
  291.       elements of X .                                                           
  292.                                                                                 
  293. ANS   Variable created automatically  when  expressions  are  not               
  294.       assigned to anything else.                                                
  295.                                                                                 
  296. ATAN  ATAN(X)  is the arctangent of  X .  See FUN .                             
  297.                                                                                 
  298. BASE  BASE(X,B) is a vector containing the base B  representation               
  299.       of   X  .   This is often used in conjunction with DISPLAY.               
  300.       DISPLAY(X,B)  is  the  same  as  DISPLAY(BASE(X,B)).    For               
  301.       example,    DISP(4*ATAN(1),16)   prints   the   hexadecimal               
  302.       representation of pi.                                                     
  303.                                                                                 
  304. CHAR  CHAR(K)  requests  an  input  line  containing   a   single               
  305.       character  to  replace  MATLAB  character  number  K in the               
  306.       following table.  For example, CHAR(45) replaces backslash.               
  307.       CHAR(-K) replaces the alternate character number K.                       
  308.                                                                                 
  309.                 K  character alternate name                                     
  310.               0 - 9   0 - 9    0 - 9   digits                                   
  311.              10 - 35  A - Z    a - z   letters                                  
  312.                36                      blank                                    
  313.                37       (        (     lparen                                   
  314.                38       )        )     rparen                                   
  315.                39       ;        ;     semi                                     
  316.                40       :        |     colon                                    
  317.                41       +        +     plus                                     
  318.                42       -        -     minus                                    
  319.                43       *        *     star                                     
  320.                44       /        /     slash                                    
  321.                45       \        $     backslash                                
  322.                46       =        =     equal                                    
  323.                47       .        .     dot                                      
  324.                48       ,        ,     comma                                    
  325.                49       '        "     quote                                    
  326.                50       <        [     less                                     
  327.                51       >        ]     great                                    
  328.                                                                                 
  329. CHOL  Cholesky factorization.  CHOL(X)  uses  only  the  diagonal               
  330.       and upper triangle of  X .  The lower triangular is assumed               
  331.       to be the (complex conjugate) transpose of the  upper.   If               
  332.       X   is  positive  definite,  then  R = CHOL(X)  produces an               
  333.       upper triangular  R  so that  R'*R = X .   If   X   is  not               
  334.       positive definite, an error message is printed.                           
  335.                                                                                 
  336. CHOP  Truncate arithmetic.  CHOP(P) causes P places to be chopped               
  337.       off   after   each   arithmetic   operation  in  subsequent               
  338.       computations.  This means  P  hexadecimal  digits  on  some               
  339.       computers  and  P octal digits on others.  CHOP(0) restores               
  340.       full precision.                                                           
  341.                                                                                 
  342. CLEAR Erases all variables, except EPS, FLOP, EYE and RAND.                     
  343.       X = <>  erases only variable  X .  So does CLEAR X .                      
  344.                                                                                 
  345. COND  Condition number in 2-norm.  COND(X) is the  ratio  of  the               
  346.       largest singular value of  X  to the smallest.                            
  347.                                                                                 
  348. CONJG CONJG(X)  is the complex conjugate of  X .                                
  349.                                                                                 
  350. COS   COS(X)  is the cosine of  X .  See FUN .                                  
  351.                                                                                 
  352. DET   DET(X)  is the determinant of the square matrix  X .                      
  353.                                                                                 
  354. DIAG  If  V  is  a  row  or  column  vector  with  N  components,               
  355.       DIAG(V,K)   is a square matrix of order  N+ABS(K)  with the               
  356.       elements of  V  on the K-th diagonal.  K = 0  is  the  main               
  357.       diagonal,  K  >  0  is above the main diagonal and K < 0 is               
  358.       below the main diagonal.  DIAG(V)  simply puts  V   on  the               
  359.       main diagonal.                                                            
  360.       eg. DIAG(-M:M) + DIAG(ONES(2*M,1),1) + DIAG(ONES(2*M,1),-1)               
  361.       produces a tridiagonal matrix of order 2*M+1 .                            
  362.       IF  X  is a matrix,  DIAG(X,K)  is a column  vector  formed               
  363.       from the elements of the K-th diagonal of  X .                            
  364.       DIAG(X)  is the main diagonal of  X .                                     
  365.       DIAG(DIAG(X))  is a diagonal matrix .                                     
  366.                                                                                 
  367. DIARY DIARY('file') causes a  copy  of  all  subsequent  terminal               
  368.       input and most of the resulting output to be written on the               
  369.       file. DIARY(0) turns it off.  See FILE.                                   
  370.                                                                                 
  371. DISP  DISPLAY(X) prints X  in  a  compact  format.   If  all  the               
  372.       elements  of  X  are  integers  between 0 and 51, then X is               
  373.       interpreted  as  MATLAB  text  and   printed   accordingly.               
  374.       Otherwise,  +  ,  -   and  blank  are printed for positive,               
  375.       negative and zero elements.  Imaginary parts are ignored.                 
  376.       DISP(X,B) is the same as DISP(BASE(X,B)).                                 
  377.                                                                                 
  378. EDIT  There  are  no   editing   features   available   on   most               
  379.       installations and EDIT is not a command.  However, on a few               
  380.       systems a command line consisting of a single  backslash  \               
  381.       will  cause  the local file editor to be called with a copy               
  382.       of the  previous  input  line.   When  the  editor  returns               
  383.       control to MATLAB, it will execute the line again.                        
  384.                                                                                 
  385. EIG   Eigenvalues and eigenvectors.                                             
  386.       EIG(X) is a vector containing the eigenvalues of  a  square               
  387.       matrix  X .                                                               
  388.       <V,D>  =  EIG(X)   produces  a  diagonal  matrix    D    of               
  389.       eigenvalues  and  a  full  matrix  V  whose columns are the               
  390.       corresponding eigenvectors so that  X*V = V*D .                           
  391.                                                                                 
  392. ELSE  Used with IF .                                                            
  393.                                                                                 
  394. END   Terminates the scope  of  FOR,  WHILE  and  IF  statements.               
  395.       Without  END's,  FOR  and WHILE repeat all statements up to               
  396.       the end of the line.  Each END is paired with  the  closest               
  397.       previous  unpaired FOR or WHILE and serves to terminate its               
  398.       scope.  The line                                                          
  399.       FOR I=1:N, FOR J=1:N, A(I,J)=1/(I+J-1); A                                 
  400.       would cause A to be printed  N**2  times, once for each new               
  401.       element.  On the other hand, the line                                     
  402.       FOR I=1:N, FOR J=1:N, A(I,J)=1/(I+J-1); END, END, A                       
  403.       will lead to only the final printing of  A .                              
  404.       Similar considerations apply to WHILE.                                    
  405.       EXIT terminates execution of loops or of MATLAB itself.                   
  406.                                                                                 
  407. EPS   Floating point relative  accuracy.   A  permanent  variable               
  408.       whose  value is initially the distance from 1.0 to the next               
  409.       largest floating point number.  The  value  is  changed  by               
  410.       CHOP,  and  other values may be assigned.  EPS is used as a               
  411.       default tolerance by PINV and RANK.                                       
  412.                                                                                 
  413. EXEC  EXEC('file',k) obtains  subsequent  MATLAB  input  from  an               
  414.       external  file.  The printing of input is controlled by the               
  415.       optional parameter k .                                                    
  416.       If k = 1 , the input is echoed.                                           
  417.       If k = 2 , the MATLAB prompt <> is printed.                               
  418.       If k = 4 , MATLAB pauses before each prompt and waits for a               
  419.       null line to continue.                                                    
  420.       If k = 0 , there is no echo, prompt or pause.  This is  the               
  421.       default if the exec command is followed by a semicolon.                   
  422.       If k = 7 , there will be echos, prompts and pauses. This is               
  423.       useful for demonstrations on video terminals.                             
  424.       If k = 3 , there will be echos and prompts, but no  pauses.               
  425.       This is the the default if the exec command is not followed               
  426.       by a semicolon.                                                           
  427.       EXEC(0) causes subsequent input to  be  obtained  from  the               
  428.       terminal. An end-of-file has the same effect.                             
  429.       EXEC's may be nested, i.e. the text in the file may contain               
  430.       EXEC of another file.  EXEC's may also be driven by FOR and               
  431.       WHILE loops.                                                              
  432.                                                                                 
  433. EXIT  Causes termination of a FOR or WHILE loop.                                
  434.       If not in a loop, terminates execution of MATLAB.                         
  435.                                                                                 
  436. EXP   EXP(X)  is the exponential of  X ,  e  to the X .  See  FUN               
  437.       .                                                                         
  438.                                                                                 
  439. EYE   Identity matrix.  EYE(N) is the N  by  N  identity  matrix.               
  440.       EYE(M,N)   is an M by N matrix with 1's on the diagonal and               
  441.       zeros elsewhere.  EYE(A)  is the same size  as   A  .   EYE               
  442.       with  no  arguments is an identity matrix of whatever order               
  443.       is appropriate in the context.   For  example,  A  +  3*EYE               
  444.       adds  3  to each diagonal element of  A .                                 
  445.                                                                                 
  446. FILE  The EXEC, SAVE, LOAD,  PRINT  and  DIARY  functions  access               
  447.       files.   The  'file'  parameter  takes  different forms for               
  448.       different operating systems.  On most systems,  'file'  may               
  449.       be a string of up to 32 characters in quotes.  For example,               
  450.       SAVE('A') or EXEC('matlab/demo.exec') .  The string will be               
  451.       used as the name of a file in the local operating system.                 
  452.       On all systems, 'file' may be a positive integer   k   less               
  453.       than  10  which  will  be  used  as  a FORTRAN logical unit               
  454.       number. Some systems then automatically access a file  with               
  455.       a  name  like  FORT.k  or FORk.DAT. Other systems require a               
  456.       file with a name like FT0kF001 to be assigned  to  unit   k               
  457.       before  MATLAB  is  executed. Check your local installation               
  458.       for details.                                                              
  459.                                                                                 
  460. FLOPS Count of floating point operations.                                       
  461.       FLOPS  is  a  permanently  defined  row  vector  with   two               
  462.       elements.    FLOPS(1)  is  the  number  of  floating  point               
  463.       operations counted during the previous statement.  FLOPS(2)               
  464.       is  a  cumulative total.  FLOPS can be used in the same way               
  465.       as any other vector.  FLOPS(2) = 0  resets  the  cumulative               
  466.       total.   In  addition,  FLOPS(1) will be printed whenever a               
  467.       statement is terminated by an extra comma.  For example,                  
  468.       X = INV(A);,                                                              
  469.       or                                                                        
  470.       COND(A),   (as the last statement on the line).                           
  471.       HELP FLPS gives more details.                                             
  472.                                                                                 
  473. FLPS  More detail on FLOPS.                                                     
  474.       It is not feasible to count absolutely all  floating  point               
  475.       operations,  but  most  of  the important ones are counted.               
  476.       Each multiply and add in a real vector operation such as  a               
  477.       dot  product  or  a 'saxpy' counts one flop.  Each multiply               
  478.       and add in a complex vector  operation  counts  two  flops.               
  479.       Other additions, subtractions and multiplications count one               
  480.       flop each if the result is real and two flops if it is not.               
  481.       Real  divisions  count one and complex divisions count two.               
  482.       Elementary functions count one if real and two if  complex.               
  483.       Some examples.  If A and B are real N by N matrices, then                 
  484.       A + B  counts N**2 flops,                                                 
  485.       A*B    counts N**3 flops,                                                 
  486.       A**100 counts 99*N**3 flops,                                              
  487.       LU(A)  counts roughly (1/3)*N**3 flops.                                   
  488.                                                                                 
  489. FOR   Repeat statements a specific number of times.                             
  490.       FOR variable = expr, statement, ..., statement, END                       
  491.       The END at the end of a line may  be  omitted.   The  comma               
  492.       before  the  END  may  also be omitted.  The columns of the               
  493.       expression are stored one at a time  in  the  variable  and               
  494.       then the following statements, up to the END, are executed.               
  495.       The expression is often of the form X:Y, in which case  its               
  496.       columns  are  simply  scalars.  Some examples (assume N has               
  497.       already been assigned a value).                                           
  498.       FOR I = 1:N, FOR J = 1:N, A(I,J) = 1/(I+J-1);                             
  499.       FOR J = 2:N-1, A(J,J) = J; END; A                                         
  500.       FOR S = 1.0: -0.1: 0.0, ...  steps S with increments of -0.1 .            
  501.       FOR E = EYE(N), ...   sets  E  to the unit N-vectors.                     
  502.       FOR V = A, ...   has the same effect as                                   
  503. SHAR_EOF
  504. #    End of shell archive
  505. exit 0
  506. -- 
  507. Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
  508. Have five nice days.
  509.